<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>echarts</title>
    <script src="../js/echarts.js"></script>
    <style>
      #chart {
        width: 800px;
        height: 400px;
      }
    </style>
  </head>
  <body>
    <div id="chart"></div>
  </body>
  <script>
    const chart = echarts.init(document.getElementById('chart'))
    chart.setOption({
      title: {
        text: '标题'
      },
      xAxis: {},
      yAxis: {},
      dataset: {
        source: [
          [13, 44],
          [51, 51],
          [59, 32],
          [87, 19],
          [19, 33]
        ]
      },
      series: {
        type: 'scatter', // 散点图
        encode: { x: 0, y: 1 } // x 对应第一列，y 对应第二列
      }
    })
  </script>
</html>
